<%--
    author:xuzm
    date:20180419
    
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" isELIgnored="false" %>
<link type="text/css" rel="stylesheet" href="css/tradeRate/tradeRate.css"/>
<div class="modal-header">
    <button class="close" ng-click="back()">
        <span aria-hidden="true">×</span>
    </button>
    <h3 class="modal-title" id="modal-title">汇率编辑</h3>
</div>
<div class="modal-body" id="modal-body">
		 <form id="tradeRateObjForm" role="form" name="tradeRateObjForm" class="form-horizontal"  ng-model="tradeRate">
			  <div class="form-group">
			    <label for="name" class="col-sm-3 control-label" ><font color="red">*</font>原始币种:</label>

				  <div class="col-sm-8 set-height33" >
			    <select id="sourceCurrency" name="sourceCurrency" size="0" tip="2" class="form-control select-style1" ng-change="sourceCurrencyChange()"  ng-blur="selectBlur($event)" ng-model="tradeRate.sourceCurrency" required >
		               <option value="String" style="display:none;"></option>
		               <option value="" ng-modal="sourceCurrencyOption" ng-mouseover="optionMouseOver($event)" ng-click="optionMouseClick($event)" ></option>
		               <option ng-repeat="item in selectCurrencys" ng-selected="tradeRate.sourceCurrency == item.firstValue" value="{{item.firstValue}}" ng-modal="sourceCurrencyOption_{{item.firstValue}}" ng-mouseover="optionMouseOver($event)" ng-click="optionMouseClick($event)" >{{item.name}}</option>
		        </select>
		        <span id="sourceCurrencyPrompt" class="no-select-prompt" ><font color="#999" >必选</font></span>
		        </div>
			  </div>
			  <div class="form-group">
			    <label for="name" class="col-sm-3 control-label" ><font color="red">*</font>目标币种:</label>
			    <div class="col-sm-8 set-height33" >
			    <select id="targetCurrency" name="targetCurrency" size="0" tip="2" class="form-control select-style2" ng-change="targetCurrencyChange()" ng-blur="selectBlur($event)" ng-model="tradeRate.targetCurrency" required >
		               <option value="String" style="display:none;"></option>
		               <option value="" ng-modal="targetCurrencyOption" ng-mouseover="optionMouseOver($event)" ng-click="optionMouseClick($event)" ></option>
		               <option ng-repeat="item in selectCurrencys" ng-selected="tradeRate.targetCurrency == item.firstValue" value="{{item.firstValue}}" ng-modal="targetCurrencyOption_{{item.firstValue}}" ng-mouseover="optionMouseOver($event)" ng-click="optionMouseClick($event)" >{{item.name}}</option>
		        </select>
		        <span id="targetCurrencyPrompt" class="no-select-prompt" ><font color="#999" >必选</font></span>
		        </div>
			  </div>
			  <div class="form-group">
			    <label for="rate" class="col-sm-3 control-label" ><font color="red">*</font>汇率</label>
			    <div class="col-sm-8" >
			    <input type="text" id="rate" name="rate" tip="1"  ng-model="tradeRate.rate" ng-focus="rateFocus()" ng-blur="rateBlur()" class="form-control" placeholder="必填" />
			    </div>
			  </div>
			  <div class="form-group">
			    <label for="remark" class="col-sm-3 control-label" >备注</label>
			    <div class="col-sm-8" >
			    <input type="text" id="remark" name="remark" tip="2"   ng-model="tradeRate.remark"  class="form-control" placeholder=""  />
			    </div>
			  </div>		
		</form>
		<div class="col-sm-12">
            <div class="center">
					<button class="btn btn-sm btn-primary general-btn" type="button"
                            ng-disabled="tradeRateObjForm.sourceCurrency.$pristine &&
					                     tradeRateObjForm.targetCurrency.$pristine &&
					                     tradeRateObjForm.remark.$pristine &&
					                     tradeRateObjForm.rate.$pristine"
                            ng-click="updateTradeRate()" >
						确定
					</button>
            </div>
        </div>
       </div>
</div>